projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3b1945
)
Fix compiler warning
author
Emmanuele Bassi
<ebassi@gnome.org>
Thu, 16 Apr 2020 15:37:41 +0000
(16:37 +0100)
committer
Emmanuele Bassi
<ebassi@gnome.org>
Thu, 16 Apr 2020 18:40:00 +0000
(19:40 +0100)
Newer versions of GCC are fairly aggressive with NULL checks.
gtk/gtktextview.c
patch
|
blob
|
history
diff --git
a/gtk/gtktextview.c
b/gtk/gtktextview.c
index c4f7266515b486e1ef261c800db1fe9ab3f6f874..1835c4fd14e793658dd220af7c08cae911d0c284 100644
(file)
--- a/
gtk/gtktextview.c
+++ b/
gtk/gtktextview.c
@@
-4354,7
+4354,7
@@
gtk_text_view_get_gutter (GtkTextView *text_view,
childp = find_child_for_window_type (text_view, win);
- if (*childp != NULL)
+ if (
childp != NULL &&
*childp != NULL)
return GTK_WIDGET (*childp);
return NULL;
@@
-4388,6
+4388,9
@@
gtk_text_view_set_gutter (GtkTextView *text_view,
win == GTK_TEXT_WINDOW_BOTTOM);
childp = find_child_for_window_type (text_view, win);
+ if (childp == NULL)
+ return;
+
old_child = *childp;
if ((GtkWidget *)old_child == widget)